<script setup lang='ts'>

import { ref } from 'vue';

type Todo = {
  id: number
  title: string
  isFinished: boolean
}

const TodoList = ref<Todo[]>([
  { id: 1, title: '敲代码', isFinished: false },
  { id: 2, title: '背面试题', isFinished: false },
  { id: 3, title: '睡觉', isFinished: true },
])

</script>

<template>
  <div>
    <ul>
      <li v-for="item in TodoList" :key="item.id">
        序号为：{{ item.id }}
        任务：{{ item.title }}
        是否完成：{{ item.isFinished ? '完成' : '未完成' }}
      </li>
    </ul>
  </div>
</template>

<style scoped></style>